package com.luoran.bartalks.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.luoran.bartalks.dao.IBtPlanTemplateEntryDao;
import com.luoran.bartalks.entity.biz.BtPlanTemplateEntry;
import com.luoran.bartalks.service.IBtPlanTemplateEntryService;

@Service
public class BtPlanTemplateEntryService implements IBtPlanTemplateEntryService {

	@Autowired
	private IBtPlanTemplateEntryDao dao;

	@Override
	public void deleteBtPlanTemplateEntryById(String id) {
		dao.deleteBtPlanTemplateEntryById(id);
	}

	@Override
	public List<BtPlanTemplateEntry> getBtPlanTemplateEntryByParentId(String planTemplateId,String companyId) {
		return dao.getBtPlanTemplateEntryByParentId(planTemplateId,companyId);
	}

	@Override
	public BtPlanTemplateEntry queryBtPlanTemplateEntryById(String id) {
		return dao.single(id);
	}

	@Override
	public BtPlanTemplateEntry addBtPlanTemplateEntry(BtPlanTemplateEntry btPlanTemplateEntry) {
		 dao.insert(btPlanTemplateEntry);
		return btPlanTemplateEntry;
	}

	@Override
	@Transactional()
	public void deleteBtPlanTemplateEntryByPlanTemplateId(String planTemplateId) {
		dao.deleteBtPlanTemplateEntryByPlanTemplateId(planTemplateId);
	}

	@Override
	public BtPlanTemplateEntry getBtPlanTemplateEntrydDayByPositionCode(String PositionCode) {
		return 	dao.getBtPlanTemplateEntrydDayByPositionCode(PositionCode);
	}

	

}
